package com.bdqn.service.impl;

import com.bdqn.mapper.AppVersionMapper;
import com.bdqn.pojo.AppVersion;
import com.bdqn.service.AppVersionService;
import com.bdqn.util.LayData;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("appVersionService")
public class AppVersionServiceImpl implements AppVersionService {
    @Resource
    private AppVersionMapper appVersionMapper;

    @Override
    public Long addvision(AppVersion appVersion) {
        return appVersionMapper.addvision(appVersion);
    }

    @Override
    public LayData listAppVersion(Long from, Long pageSize, Long id) {
        return LayData.data(appVersionMapper.count(id),appVersionMapper.listAppVersion((from-1)*pageSize,pageSize,id));
    }

    @Override
    public AppVersion selectIOne(Long id) {
        return appVersionMapper.selectIOne(id);
    }

    @Override
    public Long setVer(AppVersion appVersion) {
        return appVersionMapper.setVer(appVersion);
    }


}
